---
category: Validator
created: '2020-04-19'
title: Check if a string is upper case
updated: '2021-10-13'
---

**JavaScript version**

```js isUpperCase.js
const isUpperCase = (str) => str === str.toUpperCase();
```

**TypeScript version**

```ts isUpperCase.ts
const isUpperCase = (str: string): boolean => str === str.toUpperCase();
```
